package com.ugoodtech.mdcc.core.service.impl;

import com.ugoodtech.mdcc.core.domain.Station;
import com.ugoodtech.mdcc.core.service.CoreStationService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class CoreStationServiceImpl implements CoreStationService {

    /**
     * 通过相同维修站编号的Station过滤出未补充完资料的StationId
     *
     * @param sameNumStationList
     * @return
     */
    @Override
    public List<Long> getUnCheckoutStationId(List<Station> sameNumStationList) {
        List<Long> unCheckOutStationIdList = new ArrayList<>();
        for (Station station : sameNumStationList) {
            if (!station.isCheckStation()) {
                unCheckOutStationIdList.add(station.getId());
            }
        }
        return unCheckOutStationIdList;
    }

    /**
     * 通过相同维修站编号的Station过滤出未补充完资料的Station
     *
     * @param sameNumStationList
     * @return
     */
    @Override
    public List<Station> getUnCheckoutStation(List<Station> sameNumStationList) {
        List<Station> unCheckOutStationIdList = new ArrayList<>();
        for (Station station : sameNumStationList) {
            if (!station.isCheckStation()) {
                unCheckOutStationIdList.add(station);
            }
        }
        return unCheckOutStationIdList;
    }


}
